package wrapper;

public class IntegerDemo {
    public static void main(String[] args) {
        Integer i1 = Integer.valueOf(500);
        Integer i2 = Integer.valueOf(500);
        System.out.println(i1==i2);
        System.out.println(i1.equals(i2));

        Integer a = Integer.valueOf(5);//基本---包装
        int b = a.intValue();//包装---------------基本

        Integer c = 5;//相当于：Integer c = Integer.valueOf(5);---------装
        int d = c;//相当于：int d = c.intValue();----------------------拆

        int max = Integer.MAX_VALUE;
        int min = Integer.MIN_VALUE;
        System.out.println(max+","+min);

        long max1 = Long.MAX_VALUE;
        long min1 = Long.MIN_VALUE;
        System.out.println(max1+","+min1);

        String s1 = "40";
        int age = Integer.parseInt(s1);
        System.out.println(s1);
        String s2 = "123.456";
        double price = Double.parseDouble(s2);
        System.out.println(price);
    }
}
